package com.weitu.workflow.definition.dao.impl;

import com.weitu.workflow.definition.dao.WorkflowDefDao;
import org.fireflow.engine.definition.WorkflowDefinition;
import org.fireflow.engine.definition.WorkflowDefinitionInfo;
import org.hibernate.Query;
import org.hibernate.SessionFactory;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2017/3/17.
 */
public class WorkflowDefDaoImpl extends HibernateDaoSupport implements WorkflowDefDao {
    private SessionFactory sessionFactory;

    public List byHSQL(String hsql, Object param) {
        List result = getHibernateTemplate().find(hsql, param);
        return result;
    }
    /** 删除单参数查询出的对象集 */
    public void removeByHSQL(String hsql, Object param){
        List list = this.byHSQL(hsql, param);
        getHibernateTemplate().deleteAll(list);
    }



}
